-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed map search #3491
base: main
Are you sure you want to change the base?
fixed map search #3491
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
@@ -123,7 +123,7 @@ | |||
<string name="submit_questionnaire">Submit</string> | |||
<string name="invalid_base_resource">The base resource for GeoWidgetConfiguration MUST be Location</string> | |||
<string name="no_search_coonfigs_provided">No configs provided for search bar</string> | |||
<string name="no_found_locations_matching_text">No location found matching text \"%1$s\"</string> | |||
<string name="no_found_locations_matching_text">No caregiver found matching text \"%1$s\"</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@owais-vd This change should not be here. But pushed to the Strings XML file of the build variant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@f-odhiambo done
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3491 +/- ##
=======================================
Coverage 27.2% 27.2%
Complexity 749 749
=======================================
Files 275 275
Lines 13940 13936 -4
Branches 2532 2531 -1
=======================================
Hits 3794 3794
+ Misses 9622 9618 -4
Partials 524 524
Flags with carried forward coverage won't be shown. Click here to find out more.
|
private fun zoomToLocationsOnMap(features: List<Feature>) { | ||
if (features.isEmpty()) return | ||
if (features.isEmpty()) { | ||
geoJsonSource?.setGeoJson(null as FeatureCollection?) | ||
mapView.getMapAsync { mapboxMap -> mapboxMap.easeCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.DEFAULT)) } | ||
return | ||
} | ||
featureCollection = FeatureCollection.fromFeatures(features) | ||
|
||
val locationPoints = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation was refactored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would no longer be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #3488
geoWidgetViewModel.features.postValue(geoJsonFeatures) | ||
if (geoJsonFeatures.isEmpty()) { | ||
geoWidgetLauncherViewModel.emitSnackBarState( | ||
SnackBarMessageConfig( | ||
message = | ||
getString(R.string.no_found_locations_matching_text, searchText), | ||
getString(R.string.no_found_locations_matching_text, searchText), | ||
), | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition has just been inverted. Not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@owais-vd @syedowaisali please look into this.
<resources> | ||
<string name="no_found_locations_matching_text">No caregiver found matching text \"%1$s\"</string> | ||
</resources> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Close this PR and create a new PR pointing to the main branch with this change in gizEir build variant. @f-odhiambo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ellykits I might be wrong but this is on the gizEir strings.xml. I think it's fine there
private fun zoomToLocationsOnMap(features: List<Feature>) { | ||
if (features.isEmpty()) return | ||
if (features.isEmpty()) { | ||
geoJsonSource?.setGeoJson(null as FeatureCollection?) | ||
mapView.getMapAsync { mapboxMap -> mapboxMap.easeCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.DEFAULT)) } | ||
return | ||
} | ||
featureCollection = FeatureCollection.fromFeatures(features) | ||
|
||
val locationPoints = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would no longer be required.
private fun zoomToLocationsOnMap(features: List<Feature>) { | ||
if (features.isEmpty()) return | ||
if (features.isEmpty()) { | ||
geoJsonSource?.setGeoJson(null as FeatureCollection?) | ||
mapView.getMapAsync { mapboxMap -> mapboxMap.easeCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.DEFAULT)) } | ||
return | ||
} | ||
featureCollection = FeatureCollection.fromFeatures(features) | ||
|
||
val locationPoints = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #3488
<resources> | ||
<string name="no_found_locations_matching_text">No caregiver found matching text \"%1$s\"</string> | ||
</resources> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ellykits I might be wrong but this is on the gizEir strings.xml. I think it's fine there
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes [link to issue]
Engineer Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guideCode Reviewer Checklist
strings.xml
file